package ck.mmd.dao;

import org.apache.commons.dbutils.QueryRunner;

import ck.mmd.bean.AdoptOrder;
import ck.mmd.util.DaoUtils;

public class AdoptOrderDao {
	public void addAdoptOrder(AdoptOrder order) {
		String sql = "insert into adoptorder values(?,?,?,?,?,?)";
		try{
			QueryRunner runner = new QueryRunner(DaoUtils.getSource());
			runner.update(sql, order.getId(),order.getSenduser_id(),order.getRecvuser_id(),order.getAdopt_id()
					,order.getTime(),1);
		}catch(Exception e){
			e.printStackTrace();
			throw new RuntimeException(e);
		}
	}
}
